﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TestSystem.DataModel
{
    public class BindingSource
    {
        private BindingSource()
        {
            ChooseList.Clear();
            BlankList.Clear();

            this.TotalAccounts = 0;
        }

        private static BindingSource instance = new BindingSource();

        public static BindingSource GetInstance()
        {
            return instance;
        }

        public List<Choose> ChooseList = new List<Choose>();
        public List<Blank> BlankList = new List<Blank>();

        public Account CurrentUser
        {
            get;
            set;
        }

        public int index = 0;

        private String testFilePath = @"\Resource\tests.txt";

        private String startUpPath = AppDomain.CurrentDomain.BaseDirectory;

        public String TestFilePath
        {
            get
            {
                return this.startUpPath + this.testFilePath;
            }
        }

        private String userFilePath = @"\Resource\users.txt";

        public int TotalAccounts
        {
            get;
            set;
        }

        public String UserFilePath
        {
            get
            {
                return this.startUpPath + this.userFilePath;
            }
        }

        private String teacherTag = "teacher";

        private String studentTag = "student";

        private String adminTag = "admin";

        public String AdminTag
        {
            get
            {
                return this.adminTag;
            }
        }


        public String TeacherTag
        {
            get
            {
                return this.teacherTag;
            }
        }


        public String StudentTag
        {
            get
            {
                return this.studentTag;
            }

        }
    }
}